1. Technical Field
This application generally relates to computer systems, and more particularly to scheduling tasks for execution in a computer system.
2. Description of Related Art
Computer systems may include an operating system providing for multi-tasking. Multi-tasking allows users to run multiple programs and gives the appearance that the computer system is executing all of the programs at the same time. The operating system performs multi-tasking by swapping tasks, processes, threads, and the like in and out of an execution or run state.
The operating system may schedule different tasks for execution in accordance with a variety of different criteria. For example, an operating system may schedule a new task for execution if a currently executing task is awaiting completion of a slow I/O operation. A new task may also be scheduled for execution interrupting a current task if the new task has a higher scheduling priority, or if the current task has run a completed time quantum or preset amount.
Drawbacks may exist with the amount of scheduling latency in connection with selecting and scheduling tasks for execution. For example, in connection with a priority-based scheme, the task with the highest priority of all tasks may be selected for execution. As the number of tasks in a “waiting for execution” state increases, the management and selection of the highest priority task may increase. Additionally, an embodiment may further implement an additional policy, such as an age policy, and also schedule a task for execution in connection with how long a task has been in the system, or waiting to execute. Taking into account the various criteria may increase the amount of time in scheduling latency especially as the number of tasks increases in a multi-tasking environment.
It may be desirable and advantageous to utilize an efficient technique in connection with task scheduling which minimizes the scheduling latency. It may also be desirable for such techniques to be scaleable for use with small and larger number of tasks linearly with respect to the number of tasks.